<template>
  <div class="container">
    <h3 align="center">嵌套路由示例</h3>
    <hr />
    <div class="box">
      <div class="sidebar">
        <table class="table table-striped table-hover">
          <tr>
            <td><router-link to="/nest/new">最新商品</router-link></td>
          </tr>
          <tr>
            <td><router-link to="/nest/hot">热门商品</router-link></td>
          </tr>
          <tr>
            <td><router-link to="/nest/about">关于我们</router-link></td>
          </tr>
        </table>
      </div>
      <div class="main-content">
        <router-view></router-view>
      </div>
    </div>
  </div>
</template>

<script>
export default {}
</script>

<style lang="scss" scoped>
.container {
  display: flex;
  flex-direction: column;
}
.box {
  display: flex;
}
.sidebar {
  width: 100px;
  border-right: 10px solid gray;
}
.main-content {
  width: 100%;
  flex: 1;
  display: flex;
}
</style>